<?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('base/common-header', TEMPLATE_INCLUDEPATH)) : (include template('base/common-header', TEMPLATE_INCLUDEPATH));?>
<style>
    .share-msg-config{width:300px;height:135px;border:1px solid #eee;background:#fefefe;border-radius:2px;box-sizing:border-box;padding:8px;}
    .share-msg-config-box{position:relative;height:100%;}
    .share-msg-config-title{position:absolute;top:0;left:0;margin-right:0;font-size:18px;width:100%;height:50px;overflow:hidden;word-wrap:break-word;word-break:break-all;resize:none;border:none;background:inherit;outline:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;}
    .share-msg-config-desc{position:absolute;bottom:0;left:0;width:calc(100% - 60px - 8px);height:60px;margin:0;color:#aaa;word-wrap:break-word;word-break:break-all;overflow:hidden;resize:none;border:none;background:inherit;outline:none}
    .share-msg-config-cover{position:absolute;right:0;bottom:0;width:60px;height:60px;overflow:hidden;cursor:pointer;}
    .share-msg-config-cover img{width:100%;height:100%;}
    .radio-child{margin:20px}
    .design_status3 [type=radio]{position:relative}
    .design_status3 label{margin:0 14px 14px} 
</style>
<form action="<?php  echo aurl('update', ['pid'=>$row['id']])?>" id="form" method="post" class="form-horizontal ajax-form confirm" data-tolink="<?php  echo aurl('index')?>" enctype="multipart/form-data">
    <input type="hidden" name="id" value="<?php  echo $row['id'];?>" />

    <div>

        <ul class="nav nav-tabs" role="tablist" id="tabtop" data-support-name="<?php echo UNI_BRIDLE ? '' : ($row['support_name'] ?: M_SUPPORT)?>">
            <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">基础信息</a></li>
            <li role="presentation"><a href="#redpack" aria-controls="redpack" role="tab" data-toggle="tab">返利设置</a></li>
            <li role="presentation"><a href="#share" aria-controls="share" role="tab" data-toggle="tab">分享设置</a></li>
            <li role="presentation"><a href="#page" aria-controls="page" role="tab" data-toggle="tab">活动页面设置</a></li>
        </ul>

        <div class="tab-content" id="tabbody">
            <div role="tabpanel" class="tab-pane active" id="home">

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">活动标题：</label>
                    <div class="col-xs-10">
                        <input type="text" class="form-control" name="title" value="<?php  echo $row['title'];?>">
                        <p class="help-block">* 标题最多40个字符</p>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">分类：</label>
                    <div class="col-xs-10">
                        <select class="form-control text-width-normal" name="cate_id">
                            <option value="">请选择分类</option>
                            <?php  if(is_array($cates)) { foreach($cates as $cate) { ?>
                            <option value="<?php  echo $cate['id'];?>" <?php  if($row['cate_id'] == $cate['id']) { ?>selected<?php  } ?>><?php  echo $cate['name'];?></option>
                            <?php  } } ?>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">客服：</label>
                    <div class="col-xs-10">
                        <select class="form-control text-width-normal" name="service_id" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                            <option value="">请选择客服</option>
                            <?php  if(is_array($services)) { foreach($services as $service) { ?>
                            <option value="<?php  echo $service['id'];?>" <?php  if($row['service_id'] == $service['id'] || $_W['uid'] == $service['uid']) { ?>selected<?php  } ?>><?php  echo $service['name'];?></option>
                            <?php  } } ?>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">联系电话：</label>
                    <div class="col-xs-10">
                        <input type="text" class="form-control text-width-normal" name="tel" value="<?php  echo $row['tel'];?>"></div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">预付费：</label>
                    <div class="col-xs-10">
                        <input type="text" class="form-control text-width-small" name="price" value="<?php  echo $row['price'];?>" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                        元 </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">过期时间：</label>
                    <div class="col-xs-10 text-width-normal">
                        <?php  echo _tpl_form_field_date('end_time', $row['end_time'])?>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">活动封面：</label>
                    <div class="col-xs-10">
                        <?php  echo tpl_form_field_image('cover', $row['cover'])?>
                        <span class="help-block">封面建议尺寸：728*979</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">背景音乐：</label>
                    <div class="col-xs-10">
                        <?php  echo tpl_form_field_audio('music', $row['music'])?>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">背景音乐（支付后）：</label>
                    <div class="col-xs-10">
                        <?php  echo tpl_form_field_audio('music_order', $row['music_order'])?>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">弹幕设置：</label>
                    <div class="col-xs-10 limithigh">
                        <select name="show_barrager">
                            <option value="off" <?php  if($row['show_barrager'] == 'off') { ?> selected="selected"<?php  } ?>>关闭&emsp;</option>
                            <option value="on"  <?php  if($row['show_barrager'] == 'on') { ?> selected="selected"<?php  } ?>>开启&emsp;</option>
                        </select>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">活动规则：</label>
                    <div class="col-xs-10 limithigh">
                        <?php  echo tpl_ueditor('rules', $row['rules'])?>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">支付成功弹出图：</label>
                    <div class="col-xs-10">
                        <?php  echo tpl_form_field_image('pay_done_cover', $row['pay_done_cover'])?>
                        <span class="help-block">支付成功后，可以立即显示一张图片在活动页面上。建议上传竖屏图片。</span>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">支付成功图片链接：</label>
                    <div class="col-xs-10">
                        <input type="text" class="form-control" name="pay_done_link" value="<?php  echo $row['pay_done_link'];?>">
                        <span class="help-block">支付成功后，如果设置了弹出图，可以为点击图片添加一个指定的跳转链接。<br> 注：链接必须为 http:// 或 https:// 开始</span>
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">支付弹出图按钮文字：</label>
                    <div class="col-xs-10">
                        <input type="text" class="form-control" name="pay_done_btn_name" value="<?php  echo $row['pay_done_btn_name'];?>">
                        <span class="help-block">支付成功后，如果设置了按钮文字，将会在页面下方出现显示弹出图的按钮。最多10个字</span>
                    </div>
                </div>

            </div>
            <div role="tabpanel" class="tab-pane" id="redpack" v-cloak>
                <p class="alert alert-warning">开启微信返利时，需要在微擎 平台-支付参数-退款配置-微信退款 中上传证书并保存，不需要开启退款功能</p>

                    <hr>
                    <div id="show_redpack_config">
        
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right">推荐返利：</label>
                            <div class="col-xs-10">
                                <select name="open_recommend" v-model="open_recommend" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="off">关闭&emsp;</option>
                                    <option value="on">开启&emsp;</option>
                                </select>
                            </div>
                        </div>
                        <template v-if="open_recommend == 'on'">
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                <input type="hidden" name="recommend_type" value="pay" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                一级红包奖励
                                <input type="text" name="recommend_reward_min" class="form-control text-width-small align-center" v-model="recommend_reward_min" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                -
                                <input type="text" name="recommend_reward_max" class="form-control text-width-small align-center" v-model="recommend_reward_max" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                元
                                <span class="help-block">直推奖励。推荐的用户报名后，推荐人获得范围内随机金额的奖励</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                店员直推店长奖励
                                <input type="text" name="recommend_mch_max" class="form-control text-width-small align-center" v-model="recommend_mch_max" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                元
                                <span class="help-block">店员直推的用户报名后，店长获得指定金额的奖励。设置为0元时不开启此功能</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                <select class="form-control text-width-normal" name="recommend_ref_level" v-model="recommend_ref_level" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="2">开启二级奖励</option>
                                    <option value="1">关闭二级奖励</option>
                                </select>
                                 
                                <input type="text" name="recommend_reward_sep_min" class="form-control text-width-small align-center" v-model="recommend_reward_sep_min" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                -
                                <input type="text" name="recommend_reward_sep_max" class="form-control text-width-small align-center" v-model="recommend_reward_sep_max" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                元
                                <span class="help-block">间接推荐奖励。推荐的人成为直推推荐人获得奖励时，若他已报名，他的推荐人获得范围内随机金额的奖励</span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                <select class="form-control text-width-normal" name="recommend_send_type" v-model="recommend_send_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="redpack">微信现金红包</option>
                                    <option value="transfers">微信企业付款</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                <redpack v-if="recommend_send_type == 'redpack'" name="recommend" act="<?php  echo $row['recommend_pack_name'];?>" sender="<?php  echo $row['recommend_pack_sender'];?>" wishing="<?php  echo $row['recommend_pack_wishing'];?>" remark="<?php  echo $row['recommend_pack_remark'];?>"></redpack>
                                <transfers v-else-if="recommend_send_type == 'transfers'" name="recommend" remark="<?php  echo $row['recommend_pack_trans_remark'];?>"></transfers>
                            </div>
                        </div>
                        </template>
                        
                        <hr>

                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right">分享返利：</label>
                            <div class="col-xs-10">
                                <select name="open_share" v-model="open_share" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="off">关闭&emsp;</option>
                                    <option value="on">开启&emsp;</option>
                                </select>
                            </div>
                        </div>
                        <template v-if="open_share == 'on'">
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                客户
                                <select name="share_type" v-model="share_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="any">无需支付&emsp;</option>
                                    <option value="join">在报名后&emsp;</option>
                                    <option value="pay">在成功支付后&emsp;</option>
                                </select>
                                ，分享页面
                                <select name="share_value" v-model="share_value" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="1">1</option>
                                    <option value="2">2</option>
                                    <option value="3">3</option>
                                    <option value="4">4</option>
                                    <option value="5">5</option>
                                    <option value="6">6</option>
                                    <option value="7">7</option>
                                    <option value="8">8</option>
                                    <option value="9">9</option>
                                    <option value="10">10&emsp;</option>
                                </select>
                                次后可获得 
                                <input type="text" name="share_reward_min" class="form-control text-width-xsall align-center" v-model="share_reward_min" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                -
                                <input type="text" name="share_reward_max" class="form-control text-width-xsall align-center" v-model="share_reward_max" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                元
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                <select class="form-control text-width-normal" name="share_send_type" v-model="share_send_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="redpack">微信现金红包</option>
                                    <option value="transfers">微信企业付款</option>
                                </select>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right"></label>
                            <div class="col-xs-10">
                                <redpack v-if="share_send_type == 'redpack'" name="share" act="<?php  echo $row['share_pack_name'];?>" sender="<?php  echo $row['share_pack_sender'];?>" wishing="<?php  echo $row['share_pack_wishing'];?>" remark="<?php  echo $row['share_pack_remark'];?>"></redpack>
                                <transfers v-else-if="share_send_type == 'transfers'" name="share" remark="<?php  echo $row['share_pack_trans_remark'];?>"></transfers>
                            </div>
                        </div>
                        </template>

                        <hr>

                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right">分享点亮返利：</label>
                            <div class="col-xs-10">
                                <select name="signin_status" v-model="signin_status" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="on">开启&emsp;</option>
                                    <option value="off">关闭&emsp;</option>
                                </select>
                            </div>
                        </div>
                        
                        <template v-if="signin_status == 'on'">
                            <div class="form-group">
                                <label class="col-xs-2 control-label text-right"></label>
                                <div class="col-xs-10">
                                    
                                    <div class="form-group">
                                        <div class="col-xs-10">
                                            客户
                                            <select name="signin_type" v-model="signin_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                                <option value="any">无需支付&emsp;</option>
                                                <option value="pay">在成功支付后&emsp;</option>
                                            </select>，
                                            连续点亮 <input type="text" name="signin_times" class="form-control text-width-small" v-model="signin_times" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>> 天后可获得奖励 
                                            <input type="text" name="signin_reward_min" class="form-control text-width-small align-center" v-model="signin_reward_min" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                            -
                                            <input type="text" name="signin_reward_max" class="form-control text-width-small align-center" v-model="signin_reward_max" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                            元
                                            <span class="help-block">付款后每天分享一次记一次点亮，达到满额设置天数可获得指定礼品。礼品请在保存后重新回到此页面编辑</span>
                                        </div>
                                    </div>
            
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right"></label>
                                <div class="col-sm-10">
                                    <select class="form-control text-width-normal" name="signin_send_type" v-model="signin_send_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                        <option value="redpack">微信现金红包</option>
                                        <option value="transfers">微信企业付款</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right"></label>
                                <div class="col-sm-10">
                                    <redpack v-if="signin_send_type == 'redpack'" name="signin" act="<?php  echo $row['signin_pack_name'];?>" sender="<?php  echo $row['signin_pack_sender'];?>" wishing="<?php  echo $row['signin_pack_wishing'];?>" remark="<?php  echo $row['signin_pack_remark'];?>"></redpack>
                                    <transfers v-else-if="signin_send_type == 'transfers'" name="signin" remark="<?php  echo $row['signin_pack_trans_remark'];?>"></transfers>
                                </div>
                            </div>
                        </template>

                        <hr>

                        <div class="form-group">
                            <label class="col-xs-2 control-label text-right">分享页面打开次数返利：</label>
                            <div class="col-xs-10">
                                <select name="share_open_status" v-model="share_open_status" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                    <option value="on">开启&emsp;</option>
                                    <option value="off">关闭&emsp;</option>
                                </select>
                            </div>
                        </div>

                        <template v-if="share_open_status == 'on'">
                            <div class="form-group">
                                <label class="col-xs-2 control-label text-right"></label>
                                <div class="col-xs-10">
                                    
                                    <div class="form-group">
                                        <div class="col-xs-10">
                                            客户
                                            <select name="share_open_type" v-model="share_open_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                                <option value="any">无需支付&emsp;</option>
                                                <option value="pay">在成功支付后&emsp;</option>
                                            </select>，
                                            分享参与量达 <input type="text" name="share_open_times" class="form-control text-width-small" v-model="share_open_times" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>> 次后获得 
                                            <input type="text" name="share_open_reward_min" class="form-control text-width-small align-center" v-model="share_open_reward_min" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                            -
                                            <input type="text" name="share_open_reward_max" class="form-control text-width-small align-center" v-model="share_open_reward_max" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                            元
                                            <span class="help-block">分享参与量：分享后通过分享链接进入活动计1次，且每人只计1次</span>
                                        </div>
                                    </div>
            
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right"></label>
                                <div class="col-sm-10">
                                    <select class="form-control text-width-normal" name="share_open_send_type" v-model="share_open_send_type" <?php  if($_W['clerk']!==false && !empty($_GET['pid'])) { ?> disabled="disabled"<?php  } ?>>
                                        <option value="redpack">微信现金红包</option>
                                        <option value="transfers">微信企业付款</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label text-right"></label>
                                <div class="col-sm-10">
                                    <redpack v-if="share_open_send_type == 'redpack'" name="share_open" act="<?php  echo $row['share_open_pack_name'];?>" sender="<?php  echo $row['share_open_pack_sender'];?>" wishing="<?php  echo $row['share_open_pack_wishing'];?>" remark="<?php  echo $row['share_open_pack_remark'];?>"></redpack>
                                    <transfers v-else-if="share_open_send_type == 'transfers'" name="share_open" remark="<?php  echo $row['share_open_pack_trans_remark'];?>"></transfers>
                                </div>
                            </div>
                        </template>
        
                    </div>
                    

            </div>
            <div role="tabpanel" class="tab-pane" id="share">

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">分享给朋友/朋友圈：</label>
                    <div class="col-xs-10">
                        <div class="share-msg-config"><div class="share-msg-config-box">
                            <textarea name="share_text" id="share_text" class="share-msg-config-title" placeholder="请填写分享标题"><?php echo $row['share_text'] ?: '我报名了%ACTIVE%，快来与我一起参加吧！'?></textarea>
                            <textarea name="share_desc" id="share_desc" class="share-msg-config-desc" placeholder="请填写分享描述"><?php echo $row['share_desc'] ?: '%ACTIVE%'?></textarea>
                            <div class="share-msg-config-cover share-msg-config-upload">
                                <img src="<?php  echo tomedia($row['share_image']);?>">
                                <input type="hidden" name="share_image" id="share_image" value="<?php  echo $row['share_image'];?>">
                            </div>
                        </div></div>
                        <p class="help-block">
                            1. 点击指定区域可以进行编辑<br>
                            2. 标题和简述的文字不能相同<br>
                            3. 名称和简述最多100个字符，不能和活动标题内容相同。标题支持替换符：<br>
                            4. 写入 %ACTIVE% ，将替换为活动名称；<br>
                            5. 图片默认为封面图片，可点击图片上传其他图片；<br>
                            6. 自主上传图标建议尺寸为1：1 <br>
                            7. <strong>请注意</strong>：文字如果超出显示区域，实际效果将会不显示超出的部分。
                        </p>
                    </div>
                </div>

            </div>
            <div role="tabpanel" class="tab-pane" id="page">

                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">模板设置：</label>
                    <div class="col-xs-10">
                        <select name="template_type" id="template_type">
                            <option value="" <?php  if($row['template_type'] == '') { ?>selected="selected"<?php  } ?>>传统模板&emsp;</option>
                            <option value="_black" <?php  if($row['template_type'] == '_black') { ?>selected="selected"<?php  } ?>>通用（黑色）&emsp;</option>
                            <option value="_red" <?php  if($row['template_type'] == '_red') { ?>selected="selected"<?php  } ?>>通用（红色）&emsp;</option>
                            <option value="_page1" <?php  if($row['template_type'] == '_page1') { ?>selected="selected"<?php  } ?>>主题1&emsp;</option>
                        </select>
                    </div>
                </div>
                
                <div class="form-group">
                    <label class="col-xs-2 control-label text-right">分享海报图：</label>
                    <div class="col-xs-10">
                        <?php  echo tpl_form_field_image('posters', $row['posters'])?>
                        <span class="help-block">海报图建议尺寸：750*1008</span>
                        <span><img src="<?php echo WEB_RESOURCE;?>/images/example.jpg" width="500"></span>
                    </div>
                </div>
                
                <div id="template" style="display: none">
                    <div class="form-group">
                        <label class="col-xs-2 control-label text-right">免单详情显示方式：</label>
                        <div class="col-xs-10">
                            <select name="mch_list_type">
                                <option value="slider" <?php  if($row['mch_list_type'] == 'slider') { ?>selected="selected"<?php  } ?>>轮播显示&emsp;</option>
                                <option value="list" <?php  if($row['mch_list_type'] == 'list') { ?>selected="selected"<?php  } ?>>列表显示&emsp;</option>
                                <option value="none" <?php  if($row['mch_list_type'] == 'none') { ?>selected="selected"<?php  } ?>>不显示&emsp;</option>
                            </select>
                        </div>
                    </div>
                    
                    <div class="form-group">
                        <label class="col-xs-2 control-label text-right">联盟商家显示方式：</label>
                        <div class="col-xs-10">
                            <select name="mch_sets_type">
                                <option value="show" <?php  if($row['mch_sets_type'] == 'show') { ?>selected="selected"<?php  } ?>>显示&emsp;</option>
                                <option value="none" <?php  if($row['mch_sets_type'] == 'none') { ?>selected="selected"<?php  } ?>>不显示&emsp;</option>
                            </select>
                        </div>
                    </div>

                    <div class="form-group">
                        <label class="col-xs-2 control-label text-right">卡券列表显示方式：</label>
                        <div class="col-xs-10">
                            <select name="tickets_list_type">
                                <option value="always" <?php  if($row['tickets_list_type'] == 'always') { ?>selected="selected"<?php  } ?>>直接显示&emsp;</option>
                                <option value="after_order" <?php  if($row['tickets_list_type'] == 'after_order') { ?>selected="selected"<?php  } ?>>下单后显示&emsp;</option>
                            </select>
                        </div>
                    </div>
                </div>
                
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-2 control-label text-right"></label>
            <div class="col-xs-10">
                    <button type="submit" class="btn btn-success">保存</button>
            </div>
        </div>

    </div>
</form>

<script type="text/html" id="redpack_info">
<div>
    <div class="szxh-line">
        <span class="szxh-title">活动名称：</span>
        <span class="szxh-setting">
            <input type="text" class="form-control text-width-normal" :name="name+'_pack_name'" :value="act">
            <p class="help-block">* 必填，不超过32个字符，中文不超过10个字</p>
        </span>
    </div>
    <div class="szxh-line">
        <span class="szxh-title">发送人名称：</span>
        <span class="szxh-setting">
            <input type="text" class="form-control text-width-normal" :name="name+'_pack_sender'" :value="sender">
            <p class="help-block">* 必填，否则红包不能发送成功</p>
        </span>
    </div>
    <div class="szxh-line">
        <span class="szxh-title">红包祝福语：</span>
        <span class="szxh-setting">
            <input type="text" class="form-control" :name="name+'_pack_wishing'" :value="wishing">
            <p class="help-block">* 必填，否则红包不能发送成功</p>
        </span>
    </div>
    <div class="szxh-line">
        <span class="szxh-title">发放备注：</span>
        <span class="szxh-setting">
            <input type="text" class="form-control" :name="name+'_pack_remark'" :value="remark">
            <p class="help-block">* 必填，否则红包不能发送成功</p>
        </span>
    </div>
</div>
</script>
<script type="text/html" id="transfers_info">
<div>
    <div class="szxh-line">
        <span class="szxh-title">转账备注信息：</span>
        <span class="szxh-setting">
            <input type="text" class="form-control" :name="name+'_pack_trans_remark'" :value="remark">
            <p class="help-block">* 必填，否则红包不能发送成功</p>
        </span>
    </div>
</div>
</script>
<script>
    require(['Vue'], function(Vue) {
        new Vue({
            el: '#redpack',
            data: {
                status: "1",
                open_recommend: "<?php  echo $row['open_recommend'];?>" || "off",
                recommend_type: "<?php  echo $row['recommend_type'];?>" || "1",
                recommend_ref_level: "<?php  echo $row['recommend_ref_level'];?>" || "1",
                recommend_reward_min: "<?php  echo $row['recommend_reward_min'];?>" || "1",
                recommend_reward_max: "<?php  echo $row['recommend_reward_max'];?>" || "2",
                recommend_reward_sep_min: "<?php  echo $row['recommend_reward_sep_min'];?>" || "1",
                recommend_reward_sep_max: "<?php  echo $row['recommend_reward_sep_max'];?>" || "2",
                recommend_send_type: "<?php  echo $row['recommend_send_type'];?>" || "redpack",
                open_share: "<?php  echo $row['open_share'];?>" || "off",
                share_type: "<?php  echo $row['share_type'];?>" || "pay",
                share_value: "<?php  echo $row['share_value'];?>" || "3",
                share_send_type: "<?php  echo $row['share_send_type'];?>" || "redpack",
                share_reward_min: "<?php  echo $row['share_reward_min'];?>" || "1",
                share_reward_max: "<?php  echo $row['share_reward_max'];?>" || "2",
                signin_status: "<?php  echo $row['signin_status'];?>" || "off",
                signin_times: "<?php  echo $row['signin_times'];?>" || "7",
                signin_send_type: "<?php  echo $row['signin_send_type'];?>" || "redpack",
                signin_reward_min: "<?php  echo $row['signin_reward_min'];?>" || "1",
                signin_reward_max: "<?php  echo $row['signin_reward_max'];?>" || "2",
                signin_type: "<?php  echo $row['signin_type'];?>" || "pay",
                share_open_status: "<?php  echo $row['share_open_status'];?>" || "off",
                share_open_times: "<?php  echo $row['share_open_times'];?>" || "10",
                share_open_send_type: "<?php  echo $row['share_open_send_type'];?>" || "redpack",
                share_open_reward_min: "<?php  echo $row['share_open_reward_min'];?>" || "1",
                share_open_reward_max: "<?php  echo $row['share_open_reward_max'];?>" || "2",
                share_open_type: "<?php  echo $row['share_open_type'];?>" || "pay",
                recommend_mch_max: "<?php  echo $row['recommend_mch_max'];?>" || "0"
            },
            components: {
                "redpack": {
                    props: ['name','act','sender','wishing','remark'],
                    data: function() {return {}},
                    template: '#redpack_info'
                },
                'transfers': {
                    props: ['name','remark'],
                    data: function() {return {}},
                    template: '#transfers_info'
                }
            }
        });
    });
    require(['jquery'], function($) {
        $('.share-msg-config-upload').on('click', function() {
            util.image('<?php  echo tomedia($row["share_image"]);?>', function(e) {
                $('.share-msg-config-cover img').prop('src', util.tomedia(e.attachment));
                $('#share_image').val(e.attachment);
            })
        });
    });
    require(['jquery'], function($) {
        if($('#template_type').val() == '') {
            $('#template').show();
        }
        $('#template_type').on('change', function() {
            if($(this).val() == '') {
                $('#template').show();
            } else {
                $('#template').hide();
            }
        });
    });
</script>
<?php (!empty($this) && $this instanceof WeModuleSite || 1) ? (include $this->template('base/common-footer', TEMPLATE_INCLUDEPATH)) : (include template('base/common-footer', TEMPLATE_INCLUDEPATH));?><script>var we7CommonForModule = document.createElement("script");we7CommonForModule.src = '//cdn.w7.cc/we7/w7windowside.js?v=201904260003';document.body.appendChild(we7CommonForModule)
</script>